/**
 * 实时展示最新的页面
 * 一. 通过watch监听源代码变化
 *  1. "watch": "webpack --watch"
 *  2. watch: true
 */

import "./math";
import React from "react";
import ReactDOM from "react-dom";

import ReactApp from "./App.jsx";

import Vue from "vue";
import VueApp from "./App.vue";

console.log("Hello Webpack1");

if (module.hot) {
  module.hot.accept("./math.js", () => {
    console.log("math模块发生变化");
  });
}

// React
ReactDOM.render(<ReactApp />, document.getElementById("app"));

// Vue
new Vue({
  render: (h) => h(VueApp),
}).$mount("#root");
